<script type="text/javascript">
	sy.ns('sy.west');
	$(function() {

		/* 添加tab方法 */
		sy.west.addTab = function(tabsId, title, href) {
			$('#index_div_pageLoading').show();
			var id = '#' + tabsId;
			if ($(id).tabs('exists', title)) {
				$(id).tabs('select', title);
				$('#index_div_pageLoading').hide();
			} else {
				$(id).tabs('add', {
					title : title,
					href : href,
					closable : true
				});
			}
		};

		/* 初始化功能树 */
		$.fn.zTree.init($('#west_tree'), {
			view : {
				showLine: false
			},
			data : {
				simpleData : {
					enable : true
				}
			},
			callback : {
				onClick : function(event, treeId, treeNode, clickFlag) {
					sy.west.addTab('center_tabs', treeNode.name, treeNode.page);
				}
			}
		}, [ {
			id : 1,
			pId : 0,
			name : '管理系统',
			open : true,
			page : 'home.html'
		}, {
			pId : 1,
			name : '用户管理',
			page : 'page/yhgl.html'
		}, {
			pId : 1,
			name : '组织管理',
			page : 'page/yhgl1.html'
		}, {
			pId : 1,
			name : '权限管理',
			page : 'jsp/privilege.jsp'
		}, {
			pId : 1,
			name : '字典管理',
			page : 'page/zdgl.html'
		}, {
			pId : 1,
			name : '会员注册',
			page : 'page/user/userRegister.jsp'
		},{
			pId : 1,
			name : '字典管理',
			page : 'jsp/dict/dictconfig.jsp'
		}]);
		

	});
</script>
<div id="west_accordion" class="easyui-accordion" fit="true" border="false">
	<div title="Title1" iconCls="icon-save" style="overflow: auto; padding: 10px;">
		<h3 style="color: #0099FF;">Accordion for jQuery</h3>
		<p>Accordion is a part of easyui framework for jQuery. It lets you define your accordion component on web page more easily.</p>
	</div>
	<div title="控制面板" iconCls="icon-reload" selected="true">
		<ul id="west_tree" class="ztree"></ul>
	</div>
	<div title="Title3">content3</div>
</div>